package com.mangowang.module.main.holder;

import android.content.Context;
import android.media.Image;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.mangowang.lib.common.proto.Change;
import com.mangowang.module.main.R;
import com.mangowang.module.main.bean.BottomBean;


/**
 * Created by AndroidIntexh1 on 2018/9/11.
 */

public class BannerChangeHolderView extends Holder<Change.month_datas> {

    private TextView tvDes;
    private TextView tvDes_three;
    private TextView tvCheck;
    private ImageView ivBottom;


    private Context mContext;


    public BannerChangeHolderView(View itemView, Context context) {
        super(itemView);
        mContext = context;
    }


    @Override
    protected void initView(View itemView) {
        ivBottom =  (ImageView)itemView.findViewById(R.id.iv_bottom);
        tvDes =  itemView.findViewById(R.id.tv_total);
        tvDes_three =  itemView.findViewById(R.id.tv_team);
        tvCheck =  itemView.findViewById(R.id.tv_zhong);
    }

    @Override
    public void updateUI(Change.month_datas data) {
        tvDes.setText(data.getTrading());
        tvCheck.setText(data.getActivation());
        tvDes_three .setText(data.getDevelop());
        if (data.getPattern().equals("1"))
        {
            ivBottom.setBackgroundResource(R.mipmap.home_bottom);
        }else
        {
            ivBottom.setBackgroundResource(R.mipmap.iv_bottom_2);
        }



    }
}
